<?php
/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2017/4/10
 * Time: 下午3:36
 */


include "../vendor/autoload.php";


$openid = new LightOpenID('http://localhost:63342/');

$openid->identity = 'http://steamcommunity.com/openid';
if ($openid->mode) {
  echo $openid->validate() ? 'Logged in.' : 'Failed!';
  $attributes = $openid->getAttributes();
  $OAuthRequestToken = $openid->getOAuthRequestToken();
  print_r($attributes);
  echo $OAuthRequestToken;
}else{
  header('Location: ' . $openid->authUrl());
}


